package com.example.obs.dao;

import com.example.obs.model.domin.Department;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface DepartmentMapper {
    int deleteByPrimaryKey(Integer id);

    List<Department> selectDepartmentsList(Department department);

    void addDepartment(Department department);

    int insert(Department record);

    List<Department>  selectDepartmentAndAdmin();

    int updatename (Department department);

    /**
     * 根据部门名称查id
     * @param name 部门名称
     * @return 部门实体
     **/
    Department selectDepartmentByName(String name);

    /**
     * 根据部门id查实体
     * @param id 部门名称
     * @return 部门实体
     **/
    Department selectDepartmentById(Integer id);

}
